<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'blogcategory-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="help-block">Поля со <span class="required">*</span> обязательны для заполнения.</p>

	<?php echo $form->errorSummary($model); ?>

	<?php echo $form->textFieldRow($model,'title',array('class'=>'span5','maxlength'=>255)); ?>
    
    <?php echo $form->textFieldRow($model,'url',array('class'=>'span5','maxlength'=>255)); ?>

    <br />
    <?php echo CHtml::activeLabel($model, 'sort_1');  ?>
    <?php echo $form->dropDownList($model, 'sort_1', array('1'=>'Последний пост вначале', '2'=>'Последний пост вконце')); ?>

	<?php echo $form->textFieldRow($model,'paginate',array('class'=>'span2')); ?>
    
    <?php echo $form->textFieldRow($model,'meta_title',array('class'=>'span5','maxlength'=>255)); ?>
    
    <?php echo $form->textAreaRow($model,'meta_description',array('class'=>'span8', 'rows'=>6, 'cols'=>50)); ?>
    
    <?php echo $form->textFieldRow($model,'meta_keywords',array('class'=>'span5','maxlength'=>255)); ?>

    <br />
    <?php echo CHtml::activeLabel($model, 'status'); ?>
    <?php echo $form->dropDownList($model, 'status', array('1'=>'Опубликовано', '2'=>'Не опубликовано'));  ?>


    <br />
    <?php echo $form->labelEx($model, 'public_time'); ?>
    <?php
  
        $this->widget(
                      'zii.widgets.jui.CJuiDatePicker', array(
                      'model' => $model,
                      'attribute' => 'public_time',
                      'language' => 'ru',
                      // 'value' => date('Y-m-d', $model->public_time),                                        
                        'options' => array( 'dateFormat' => 'dd-mm-yy' )            
                                                )
                      );
    ?>


	<?php echo $form->textFieldRow($model,'access',array('value'=>'admin', 'class'=>'span5','maxlength'=>255)); ?>

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Создать' : 'Сохранить',
		)); ?>
	</div>

<?php $this->endWidget(); ?>
